﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;

namespace GameSchool.Models
{
	public class LevelRepository
	{
		LevelDBContextDataContext db = new LevelDBContextDataContext();
		public IEnumerable<Level> Levels()
		{
			return db.Levels;
		}

		public void Save()
		{
			db.SubmitChanges();
		}

		public void Add(Level newLevel)
		{
			db.Levels.InsertOnSubmit(newLevel);
		}
	}
}